package org.makcro.sms.services.chat.base.dao;

import java.sql.SQLException;
import java.util.List;

import javax.sql.DataSource;

import org.makcro.sms.services.chat.base.dto.HistoryItem;
import org.makcro.sms.services.chat.model.Agent;
import org.makcro.sms.services.chat.model.Question;

public interface QuestionDao extends BasicDao<Question>{

	public List<Question> findUnassigned();

	public List<org.makcro.sms.services.chat.base.dto.HistoryItem> findByAgent(Agent agent) throws SQLException;

	public List<org.makcro.sms.services.chat.base.dto.HistoryItem> findAnswered() throws SQLException;

	public List<org.makcro.sms.services.chat.base.dto.HistoryItem> findHistory(String phoneNumber) throws SQLException;

	public Question findByCoreId(Long referenceId);

	public void setDataSource(DataSource dataSource);

	public List<HistoryItem> findByAgent(Agent currentAgent, int[] pagingParams) throws SQLException;
	
	public int findCountByAgent(Agent currentAgent) throws SQLException;

	public List<HistoryItem> findAnswered(int[] pagingConfig) throws SQLException;

	public int findAllAnsweredCount() throws SQLException;

}